import { observable, action } from 'mobx'
import { ajax } from '../../api'

class Banner {

    // 轮播列表
    @observable bannerList: Array<object> = []
    @action changebannerList = async (payload: any) => {
        let { code, result }: any = await ajax.bannerlist(payload)
        if (code == 200) {
            this.bannerList = result
        }
    }

    // 轮播列表数据
    @action vipgetbannerList = (palyoad: any) => {
        this.bannerList = palyoad
    }

}

export default new Banner()